<?php

namespace backend\models;

use Yii;
use yii\data\ActiveDataProvider;


/**
 * This is the model class for table "{{%banner}}".
 *
 * @property integer $id
 * @property string  $image
 * @property integer $ctime
 */
class Banner extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName ()
    {
        return '{{%banner}}';
    }

    /**
     * @inheritdoc
     */
    public function rules ()
    {
        return [
            [ ['image','is_display'], "required"] ,
            [ ["ctime",'utime'], "string"] ,
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels ()
    {
        return [
            'id'           => ' Banner ID' ,
            'image'        => '图片' ,
            'ctime'        => '添加时间' ,
            'utime'        => '更新时间' ,
            'is_display'   => '是否显示' ,
        ];
    }
}
